package com.sinothk.image.selector.bean;

import java.io.Serializable;

public class MediaBean implements Serializable {

    public static final String TYPE_VIDEO = "video";
    public static final String TYPE_IMAGE = "image";
    public static final String TYPE_AUDIO = "audio";

    private String id;
    private String bizId;
    private String url;
    private String urlCover;
    private int resCover;
    private String type;
    private String filePath;
    private String fileName;

    private boolean localIs;

    public MediaBean() {
    }

//    public MediaBean(String url) {
//        this.url = url;
//    }
//
//    private MediaBean(String url, String type) {
//        this.url = url;
//        this.type = type;
//    }
//
//    private MediaBean(String url, String type, String urlCover) {
//        this.url = url;
//        this.urlCover = urlCover;
//        this.type = type;
//    }

    public static MediaBean getLocalVideoBean(String filePath, int resCover) {
        MediaBean mediaBean = new MediaBean();
        mediaBean.setFilePath(filePath);
        mediaBean.setResCover(resCover);
        mediaBean.setType(TYPE_VIDEO);
        mediaBean.setLocalIs(true);
        return mediaBean;
    }

    public static MediaBean getLocalImageBean(String filePath) {
        MediaBean mediaBean = new MediaBean();
        mediaBean.setFilePath(filePath);
        mediaBean.setType(TYPE_IMAGE);
        mediaBean.setLocalIs(true);
        return mediaBean;
    }

    public static MediaBean getNetImageBean(String url) {
        MediaBean mediaBean = new MediaBean();
        mediaBean.setUrl(url);
        mediaBean.setType(TYPE_IMAGE);
        mediaBean.setLocalIs(false);
        return mediaBean;
    }

    public static MediaBean getNetVideoBean(String url, String urlCover) {
        MediaBean mediaBean = new MediaBean();
        mediaBean.setUrl(url);
        mediaBean.setUrlCover(urlCover);
        mediaBean.setType(TYPE_VIDEO);
        mediaBean.setLocalIs(false);
        return mediaBean;
    }

    public static MediaBean getNetVideoBean(String url, int resCover) {
        MediaBean mediaBean = new MediaBean();
        mediaBean.setUrl(url);
        mediaBean.setResCover(resCover);
        mediaBean.setType(MediaBean.TYPE_VIDEO);
        mediaBean.setLocalIs(false);
        return mediaBean;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBizId() {
        return bizId;
    }

    public void setBizId(String bizId) {
        this.bizId = bizId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getUrlCover() {
        return urlCover;
    }

    public void setUrlCover(String urlCover) {
        this.urlCover = urlCover;
    }

    public boolean isLocalIs() {
        return localIs;
    }

    public void setLocalIs(boolean localIs) {
        this.localIs = localIs;
    }

    public int getResCover() {
        return resCover;
    }

    public void setResCover(int resCover) {
        this.resCover = resCover;
    }
}
